-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] enable exporting to onnx for PointRend #4977
[Feature] enable exporting to onnx for PointRend #4977
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4977 +/- ##
==========================================
- Coverage 65.19% 64.54% -0.66%
==========================================
Files 276 267 -9
Lines 21265 20618 -647
Branches 3534 3484 -50
==========================================
- Hits 13864 13308 -556
+ Misses 6647 6546 -101
- Partials 754 764 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@DmitriySidnev Thanks for the contribution. Please list the models you have verified in the PR description. |
Thank you for the contribution, but I have some problems when running your PR, could you provide me with the version of pytorch you used to test these models? |
@QingChuanWS, hi! I use pytorch 1.8.1. |
Hi, @DmitriySidnev. Have you verified whether the visualized result of the modified point_rend under pytorch is correct? |
@QingChuanWS, I have verified both metrics and visualized results. |
@DmitriySidnev Could you merge with master and test if it is OK for Point Rend model exporting to ONNX with batch and dynamic shape if possible? |
@RunningLeon, I have checked exporting to ONNX with dynamic shape and batch. After fixing a bug in |
21d41c6
to
b0d5be6
Compare
@DmitriySidnev Hi, please allow me to push for this PR.
|
@RunningLeon, hi! Access permissions granted. |
Hi~ error message:
'ScatterElements_2702' failed to allocate memory for requested buffer of size 1605632000. Why does this node |
Find a similar issue in onnxruntime(microsoft/onnxruntime#7612). Switched to a lower version of onnxruntime and solved this problem. |
I have tested the performance of the ONNX model with onnxruntime. Here is the result:
The performance degradation of mask is large. |
@RangiLyu, could you please share scripts and commands which you use for export and test the model? |
and
|
@RangiLyu, I could not find the reason of metrics degradation. Only one thing that in my view may be related to the problem is a constant spatial resolution of output masks (by default it is 800x1216) in onnx graph. But I am not sure about it. On the other hand significant drop of segmentation metrics probably to be due to lower detection quality. |
@DmitriySidnev @RangiLyu Could refer to here for possible reasons.
|
@DmitriySidnev , @RangiLyu #5197 may be a possible reason. |
I merged this PR with the latest master branch, and tested the performance of the ONNX model with onnxruntime. Here is the result:
It seems all right. |
Kindly ping@ZwwWayne |
@DmitriySidnev Hi, could you fix conflicts and refactor the onnx export according to #5205? Thanks a lot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think the design can be better. Can we put the complete ONNX export logic to an |
@ZwwWayne, I was worried about the functionality and now I really do not have enough free time to refactor the code. Can anyone else do this? |
OK, we will put effort on that. Thanks for the efforts. |
Merged in #5440 |
This PR with PR#953 in mmcv enables exporting to ONNX for
PointRend
based models. Affected models: